<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Kowcore
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: Global.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Kowcore
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Kowcore_Form_Admin_Global extends Engine_Form {
	public function init() {
		$this->setTitle ( 'Global Settings' )->setDescription ( 'These settings affect all members and contests in your community.' );
		
		$module_path = Engine_Api::_ ()->getModuleBootstrap ( 'kowcore' )->getModulePath ();
		$this->addPrefixPath ( 'Engine_Form_Decorator_', $module_path . '/Form/Decorator/', 'decorator' );
		
		$this->addElement ( 'Radio', 'kowcore_tips', array ('label' => 'Show Popup Tooltips', 'description' => "KOWCORE_FORM_ADMIN_GLOBAL_TIPS", 'multiOptions' => array (1 => 'Yes, show popup tooltips.', 0 => 'No, do not show popup tooltips.' ), 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'kowcore.tips', 1 ) ) );
		
		$this->addElement ( 'Text', 'kowcore_addthis_profile', array ('label' => 'Profile ID', 'description' => "KOWCORE_FORM_ADMIN_ADDTHIS_PROFILE", 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'kowcore.addthis.profile', '' ) ) );
		
		$this->addElement ( 'Radio', 'kowcore_addthis_type', array ('label' => '`Add This` Widget', 'description' => "KOWCORE_FORM_ADMIN_ADDTHIS_TYPE", 'multiOptions' => array ('type1' => 'KOWCORE_ADDTHIS_TYPE1', 'type2' => 'KOWCORE_ADDTHIS_TYPE2', 'type3' => 'KOWCORE_ADDTHIS_TYPE3' ) ) );
		$this->kowcore_addthis_type->clearDecorators ();
		$this->kowcore_addthis_type->addDecorator ( 'AddThisTypes', array () );
		
		// Add submit button
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Changes', 'type' => 'submit', 'ignore' => true ) );
	}
}